<#include 'inc-global.ftl'>
<#if DEBUG?? && DEBUG>
    <#global jsRoot = '/js'>
    <#global appRoot = '/app'>
    <#global cssRoot = '/css'>
    <#global imgRoot = '/img'>
<#else>
    <#assign cdn = 'http://ue.17173cdn.com'>
    <#global jsRoot = '/dist/js'>
    <#global appRoot = '/dist/app'>
    <#global cssRoot = '/dist/css'>
    <#global imgRoot = '/dist/img'>
</#if>

<#macro header title>
<!DOCTYPE HTML>
<html>
<head>
    <title>${title!''}</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="stylesheet" href="${cssRoot}/bootstrap.css" />
    <link rel="stylesheet" href="${cssRoot}/font-awesome/css/font-awesome.css" />
    <link rel="stylesheet" href="${cssRoot}/admin.css" />
    <link rel="stylesheet" href="${cssRoot}/datepicker.css" />
    <link rel="stylesheet" href="${cssRoot}/bootstrap-switch.css" />
    <#nested>
    
</head>
</#macro>
<#macro body menu>
<body>

<#include 'header.ftl'>
<#include 'nav.ftl'>
<div class="content">
    <#nested>
</div>


</#macro>
<#macro footer>
    <script type="text/javascript" src="${jsRoot}/seajs-2.2.1_jquery-2.1.0.js"></script>
    <script src="${jsRoot}/seajs-text.js"></script>
    <script src="${jsRoot}/seajs-style.js"></script>
    <script type="text/javascript">
        seajs.config({
            base: '/sea-modules/',
            alias: {
                '$':          'jquery/jquery/1.10.1/jquery',
                '$-debug':    'jquery/jquery/1.10.1/jquery-debug',
                'jquery':          'jquery/jquery/1.10.1/jquery',
                'jquery-debug':    'jquery/jquery/1.10.1/jquery-debug',
                'alert':      'pandora/dialog/1.0.0/alert',
                'base':      'pandora/base/1.0.0/base',
                'class':      'pandora/class/1.0.0/class',
                'widget':     'pandora/widget/1.0.0/widget',
                'confirm':    'pandora/dialog/1.0.0/confirm',
                'dialog':     'pandora/dialog/1.0.0/dialog',
                'draggable':  'pandora/dragdrop/1.0.0/draggable',
                'locker':     'pandora/locker/1.0.0/locker',
                'overlay':     'pandora/overlay/1.0.0/overlay',
                'tabs':       'pandora/tabs/1.0.0/tabs',
                'select':       'pandora/select/1.0.0/select',
                'tips':       'pandora/dialog/1.0.0/tips',
                'validate':   'pandora/validate/1.0.0/validate',
                'bootstrap3-grid': 'jquery/bootstrap3-grid/0.6.2/bootstrap3-grid',
                "daterangepicker": "jquery/daterangepicker/1.3.5/daterangepicker",
                "daterangepicker.css": "jquery/daterangepicker/1.3.5/daterangepicker.css",
                "datetimepicker" : "jquery/datetimepicker/1.0.0/datetimepicker",
                "datetimepicker.css" : "jquery/datetimepicker/1.0.0/datetimepicker.css",
                'handlebars': 'gallery/handlebars/1.0.2/handlebars',
                'moment':     'gallery/moment/2.5.1/moment'

            },
              map: [
                function(uri) {
                  if (!/\-debug\.(js|css)+/g.test(uri) && uri.indexOf('/app/') == -1) {
                    console.log(uri);
                    uri = uri.replace(/\/(.*)\.(js|css)/g, "/$1-debug.$2")
                  }
                  return uri
                }
              ],
        })
    </script>
    <#-- <script type="text/javascript" src="${jsRoot}/sea-config.js"></script> -->
    <#nested>
</body>
</html>
</#macro>